#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.show.title', type.modelName) /}

<div id="crudShow" class="${type.name}">

    <h2 id="crudShowTitle">&{'crud.show.title', type.modelName}</h2>

    <div class="objectForm">
    #{form action:@save(object._key()), enctype:'multipart/form-data'}
        #{crud.form fields:['event','personDocument', 'personDetail', 'profile']}
            #{crud.custom 'event'}
                <label for="object_evento">Evento</label>
                <input id="object_event" class="" type="text" size="50" value="${object.event}" name="object.event"
                       disabled="disabled">
            #{/crud.custom}
            #{crud.custom 'personDocument'}
                <div>
                    <label for="object_personDocument">Tipo de documento</label>
                    <input id="object_personDocument" class="" type="text" size="50"
                           value="${object.personDocument.documentType}" name="object.personDocument"
                           disabled="disabled">
                </div><br/>
                <div>
                    <label for="object_personDocument">Codigo de documento</label>
                    <input id="object_personDocument" class="" type="text" size="50"
                           value="${object.personDocument.code}" name="object.personDocument" disabled="disabled">
                </div>
            #{/crud.custom}
            #{crud.custom 'personDetail'}
                <label for="object_personDocument_person_name">Nombre</label>
                <input id="object_personDocument_person_name" class="" type="text" size="50"
                       value="${object.personDocument.person.name}" name="person_name" disabled="disabled">
                <br/><br/>
                <label for="object_personDocument_person_surname">Apellido</label>
                <input id="object_personDocument_person_surname" class="" type="text" size="50"
                       value="${object.personDocument.person.surname}" name="person_surname" disabled="disabled">
                <br/>
            #{/crud.custom}
        #{/crud.form}
        <p class="crudButtons">
            <input type="submit" name="_save" value="&{'crud.save', type.modelName}"/>
            <input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}"/>
        </p>
    #{/form}
    </div>

#{form @delete(object._key())}
    <p class="crudDelete">
        <input type="submit" value="&{'crud.delete', type.modelName}"/>
    </p>
#{/form}

</div>